import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { AiController } from 'src/common/ai/ai.controller';
import { Topic } from './common/questions/entities/topic.entity';
import { ResumeFile } from './common/resume/resume.entity';
import { QuestionsModule } from './common/questions/questions.module';
import { ResumeModule } from './common/resume/resume.module';

@Module({
  imports: [
    TypeOrmModule.forRoot({
      type: 'mysql',
      host: 'localhost',
      port: 3306,
      username: 'root',
      password: 'jsnq032211',
      database: 'graduation_project',
      entities: [Topic, ResumeFile],
      synchronize: true,
    }),
    QuestionsModule,
    ResumeModule,
  ],
  controllers: [AppController, AiController],
  providers: [AppService],
})
export class AppModule {}
